package com.felix.pattern.proxy;

import java.util.HashMap;
import java.util.Map;

/**
 * ProxyTest
 *
 * @author xuejinhua
 * @date 2018/10/30 17:42
 */
public class ProxyTest {

    public static void main(String[] args) {
       Map<String, String> map =  new HashMap<>(1);
        System.out.println(map.size());
    }

    public static final int MAXIMUM_CAPACITY = 1 << 30;

    static int tableSizeFor(int cap) {
        int n = cap - 1;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
    }
}
